use Operation;
use Map;

package CheckCellExists;
@ISA=qw/Operation/;

sub init{
    my $self = shift;
    $self->dependencies(qw/LogManager/);
}

sub perform{
    my $self = shift;

    my ($map, $pos) = ($self->params->{MAP}, $self->params->{POS});
    my $cell = $map->tiles->[$pos->[0]][$pos->[1]]; 
    
    return ActionResult->new("FAILURE", "No map cell!") unless(defined($cell));

    return ActionResult->new("SUCCESS", "OK");
}

1;
